import request from '@/utils/request'

// 获取老师端添加作业列表
export function worklist(options) {
    return request({
        url: '/bk/operation',
        method: 'get',
        params: options
    })
}


//新增作业
export function addWorkRow(options) {
    return request({
        url: '/bk/operation',
        method: 'post',
        data: options
    })
}

//删除一条作业
export function delWorkRow(id) {
    return request({
        url: `/bk/operation/${id}`,
        method: 'delete'
    })
}


//获取一条作业详情
export function getRowWork(id) {
    return request({
        url: `/bk/operation/${id}`,
        method: 'get'
    })
}

// 更新一条作业

export function upRowWork(options) {
    return request({
        url:'/bk/operation',
        method: 'put',
        data:options
    })
}


// 学生提交作业
export function subwork(options) {
    return request({
        url:'/bk/operation/submit',
        method: 'post',
        data:options
    })
}

//获取学生提交的作业列表
export function studyList(options) {
    return request({
        url:'/bk/operation/submit',
        method: 'get',
        params:options
    })
}
// 获取学生端老师布置的作业列表
export function stuworklist(bkid) {
    return request({
        url: `/bk/operation/submit.oper.list/${bkid}`,
        method: 'get'

    })
}


 //获取提交的作业详情
 export function stusubDetail(bkid) {
    return request({
        url: `/bk/operation/submit/${bkid}`,
        method: 'get'

    })
}


 //更新提交的作业
 export function upStusubwk(options) {
    return request({
        url: "/bk/operation/submit",
        method: 'put',
        data:options
    })
}

 //更新成绩
 export function upFraction(options) {
    return request({
        url: "/bk/operation/submit/frc",
        method: 'post',
        data:options
    })
}


// 提交批阅作业
export function subreView(options) {
    return request({
        url: "/bk/operation/submit/reivew",
        method: 'post',
        data:options

    })
}

//批阅记录

export function reviewRecord(id) {
    return request({
        url: `/bk/operation/submit/review_record/${id}`,
        method: 'get'
      
    })
}











